package com.google.code.irouter.portal.client.rpc.relation;

import java.util.List;

import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;

@RemoteServiceRelativePath("RelationService")
public interface RelationService extends RemoteService {
	/**
	 * Utility class for simplifying access to the instance of async service.
	 */
	public static class Util {
		private static RelationServiceAsync instance;
		public static RelationServiceAsync getInstance(){
			if (instance == null) {
				instance = GWT.create(RelationService.class);
			}
			return instance;
		}
	}
	
	boolean save(String id, String relationshipId, String name, List<Long> guideIdList, List<Long> consumerIdList) throws IllegalArgumentException;
	List<RelationResult> load(String id) throws IllegalArgumentException;
	boolean remove(String[] ids) throws IllegalArgumentException;
}
